package com.naughty.userlogin02.dao;

import com.naughty.userlogin02.bean.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserDao {

    public int getUserByMassage(@Param("username") String username, @Param("password") String password);
    public List<User> getAllUser(@Param("username") String username,@Param("pageStart") int pageStart, @Param("pageSize") int pageSize);
    public List<Doc> getAllFile(@Param("user") String user,@Param("filename") String filename,@Param("pageStart") int pageStart, @Param("pageSize") int pageSize);
    public int getUserCounts(@Param("username") String username);
    public int updateState(Integer id, Boolean state);
    public int updateDoc(Integer id,Boolean state);
    public int updateImg(Integer id,Boolean state);
    public int addUser(User user);
    public User getUpdateUser(int id);
    public int editUser(User user);
    public int deleteUser(int id);

    public int deleteFile(int id);
    public int deletePic(int id);

    public int insertGood(Good good);
    public List<Good> goods();

    public int addcontent(Boke boke);
    List<Doc> filelist(@Param("user") String user);
    List<Doc> file(@Param("fname") String fname,@Param("user") String user);

    public int addfile(Doc doc);
    public int addpicture(Picture picture);
    public List<Picture> piclist(@Param("user") String user);

    public int deletedoc(@Param("id") Integer id);
    public int addvideo(Video video);
    public List<Video> videolist(@Param("user") String user);
    public List<Doc> doclist(@Param("user") String user);
    public List<Picture> imglist(@Param("user") String user);
    public List<Picture> piolist(@Param("user") String user,@Param("fname") String fname);
    public List<Doc> docs();
    public List<Picture> imgs();
    public int addFloder(Floder floder);
    public List<Floder> floders(@Param("user") String user);
}
